﻿using System;
using System.Collections.Generic;
using System.Text;

namespace hedefgrup.reports.common
{
    public class Criteria_BeginMonth : Criteria_Month
    {
        public override string Name
        {
            get
            {
                return "Begin Month";
            }
        }

        public override string Operator
        {
            get { return ">="; }
        }

        public override object ToSqlStatementValue()
        {
            Criteria rollCriteria = Report.GetCriteriaByName("Roll");
            int roll = rollCriteria != null ? (int)rollCriteria.ToActualValue() : 0;
            int actualValue = (int)ToActualValue();
            return actualValue - roll;
        }
    }
}
